home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
smaltalk
/
manchest.lha
/
MANCHESTER
/
manchester
/
4.1
/
Pattern-examples.st
< prev
next >
Wrap
Text File
|
1993-07-24
|
14KB
|
545 lines
" NAME Pattern-examples
AUTHOR Bernard Horan <bernard@is.morgan.com>
CONTRIBUTOR Bernard Horan <bernard@is.morgan.com>
FUNCTION Some example patterns
ST-VERSIONS 4.1
PREREQUISITES Image_class-extentFromArray
CONFLICTS
DISTRIBUTION global
VERSION 2.0
DATE September 1992
SUMMARY A change set containing some methods to give examples of Patterns (especially useful to those of you with mono screens since they
can be used as paints). This was adapted from the goodie 'FillPatterns.st'
provided by parc for VI2.2. BH, 25/9/92"!
'From Objectworks(r)\Smalltalk, Release 4 of 25 October 1990 on 3 December 1991 at 6:33:50 pm'!
!Pattern class methodsFor: 'examples'!
example1
"Colours the active window with the patterns available, one at a
time. The name of the pattern is printed on the System Transcript.
Each time the user is expected to
click a mouse button. BH, 3 December 1991"
"Pattern example1"
| c gc |
c := ScheduledControllers activeController.
gc := c view graphicsContext.
(self class organization listAtCategoryNamed: 'pattern definitions' asSymbol)
do:
[:i |
Transcript show: i asString; cr.
gc paint: (self perform: i).
gc displayRectangle: c view bounds.
c sensor waitClickButton]! !
!Pattern class methodsFor: 'pattern definitions'!
alternatingShortSlants
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 0 32896 16448 8224 0 514 1028 2056 0 32896 16448 8224 0 514 1028 2056)
offset: 0@0) asPattern!
balls
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 25186 58339 58339 56797 9766 15934 15934 56797 25186 58339 58339 56797 9766 15934 15934 56797)
offset: 0@0) asPattern!
boldScatter
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 1542 24672 27756 36237 33153 6168 55512 50886 1542 24672 27756 36237 33153 6168 55512 50886)
offset: 0@0) asPattern!
bottleGlass
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 17476 14649 17476 33410 257 257 257 33410 17476 14649 17476 33410 257 257 257 33410)
offset: 0@0) asPattern!
bricks
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 514 514 65535 8224 8224 8224 65535 514 514 514 65535 8224 8224 8224 65535 514)
offset: 0@0) asPattern!
darkHorizontalLineDotZigzag
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 32125 61166 65535 43690 65535 61166 55255 48059 32125 61166 65535 43690 65535 61166 55255 48059)
offset: 0@0) asPattern!
darkScatter
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 44975 64250 63222 44975 31611 61166 49087 60138 44975 64250 63222 44975 31611 61166 49087 60138)
offset: 0@0) asPattern!
darkVerticalLineDotZigzag
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 57311 47802 57311 61166 63479 47802 63479 61166 57311 47802 57311 61166 63479 47802 63479 61166)
offset: 0@0) asPattern!
denseBlackFilledCrosshatch
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 50115 15420 15420 15420 15420 50115 50115 50115 50115 15420 15420 15420 15420 50115 50115 50115)
offset: 0@0) asPattern!
denseCrosshatch
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 65535 21845 65535 21845 65535 21845 65535 21845 65535 21845 65535 21845 65535 21845 65535 21845)
offset: 0@0) asPattern!
denseDarkDownSlant
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 56797 61166 30583 48059 56797 61166 30583 48059 56797 61166 30583 48059 56797 61166 30583 48059)
offset: 0@0) asPattern!
denseDarkUpSlant
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 61166 56797 48059 30583 61166 56797 48059 30583 61166 56797 48059 30583 61166 56797 48059 30583)
offset: 0@0) asPattern!
denseDashedDownSlant
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 4369 0 17476 8738 4369 0 17476 8738 4369 0 17476 8738 4369 0 17476 8738)
offset: 0@0) asPattern!
denseDashedUpSlant
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 17476 34952 4369 0 17476 34952 4369 0 17476 34952 4369 0 17476 34952 4369 0)
offset: 0@0) asPattern!
denseDiagonalCrosshatch
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 43690 17476 43690 4369 43690 17476 43690 4369 43690 17476 43690 4369 43690 17476 43690 4369)
offset: 0@0) asPattern!
denseHorizontal
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 65535 0 65535 0 65535 0 65535 0 65535 0 65535 0 65535 0 65535 0)
offset: 0@0) asPattern!
denseLightDownSlant
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 17476 8738 4369 34952 17476 8738 4369 34952 17476 8738 4369 34952 17476 8738 4369 34952)
offset: 0@0) asPattern!
denseLightUpSlant
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 34952 4369 8738 17476 34952 4369 8738 17476 34952 4369 8738 17476 34952 4369 8738 17476)
offset: 0@0) asPattern!
denseMediumDownSlant
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 26214 13107 39321 52428 26214 13107 39321 52428 26214 13107 39321 52428 26214 13107 39321 52428)
offset: 0@0) asPattern!
denseMediumUpSlant
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 52428 39321 13107 26214 52428 39321 13107 26214 52428 39321 13107 26214 52428 39321 13107 26214)
offset: 0@0) asPattern!
denseVertical
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 21845 21845 21845 21845 21845 21845 21845 21845 21845 21845 21845 21845 21845 21845 21845 21845)
offset: 0@0) asPattern!
diagonalWeave
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 59367 53199 39321 64764 32382 16191 39321 54227 59367 53199 39321 64764 32382 16191 39321 54227)
offset: 0@0) asPattern!
downSlantShingles
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 4112 2056 1028 514 5397 43690 65535 8224 4112 2056 1028 514 5397 43690 65535 8224)
offset: 0@0) asPattern!
horizontalScales
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 8224 20560 36751 514 514 1285 63736 8224 8224 20560 36751 514 514 1285 63736 8224)
offset: 0@0) asPattern!
horizontalWeave
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 61423 61166 65278 33410 65278 61166 61423 10280 61423 61166 65278 33410 65278 61166 61423 10280)
offset: 0@0) asPattern!
horizontalZigzag
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 49344 3084 4626 8481 49344 3084 4626 8481 49344 3084 4626 8481 49344 3084 4626 8481)
offset: 0@0) asPattern!
invertedDarkCrosshatch
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 0 21845 0 21845 0 21845 0 21845 0 21845 0 21845 0 21845 0 21845)
offset: 0@0) asPattern!
invertedScales
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 8224 8224 43690 1285 514 514 43690 20560 8224 8224 43690 1285 514 514 43690 20560)
offset: 0@0) asPattern!
lightHorizontalLineDotZigzag
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 34952 0 43690 0 34952 16705 8738 5140 34952 0 43690 0 34952 16705 8738 5140)
offset: 0@0) asPattern!
lightScatter
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 17733 2056 42148 16448 10794 33924 18504 32896 17733 2056 42148 16448 10794 33924 18504 32896)
offset: 0@0) asPattern!
lightVerticalLineDotZigzag
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 1028 43176 1028 8738 257 43176 257 8738 1028 43176 1028 8738 257 43176 257 8738)
offset: 0@0) asPattern!
mediumCrosshatch
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 65535 4369 4369 4369 65535 4369 4369 4369 65535 4369 4369 4369 65535 4369 4369 4369)
offset: 0@0) asPattern!
plaid
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 24415 3341 2827 3341 2827 44975 24415 44975 24415 3341 2827 3341 2827 44975 24415 44975)
offset: 0@0) asPattern!
plainScatter
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 8224 257 2056 16448 1028 32896 4112 514 8224 257 2056 16448 1028 32896 4112 514)
offset: 0@0) asPattern!
recursiveY
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 514 8224 20560 34952 34952 34952 34952 1285 514 8224 20560 34952 34952 34952 34952 1285)
offset: 0@0) asPattern!
scatter
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 4369 42148 19018 34952 9509 18504 41891 17476 4369 42148 19018 34952 9509 18504 41891 17476)
offset: 0@0) asPattern!
shadowScreen
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 5654 63479 0 63479 63479 5654 5654 5654 5654 63479 0 63479 63479 5654 5654 5654)
offset: 0@0) asPattern!
slantedBricks
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 33667 17476 14392 4112 8224 16448 32896 257 33667 17476 14392 4112 8224 16448 32896 257)
offset: 0@0) asPattern!
slantedScales
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 37008 24672 6168 1028 514 514 1542 2313 37008 24672 6168 1028 514 514 1542 2313)
offset: 0@0) asPattern!
sparseBlackFilledDiagonalCrosshatch
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 31868 65278 31868 14392 4112 0 4112 14392 31868 65278 31868 14392 4112 0 4112 14392)
offset: 0@0) asPattern!
sparseCrossHatch
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 1028 1028 1028 1028 1028 1028 1028 65535 1028 1028 1028 1028 1028 1028 1028 65535)
offset: 0@0) asPattern!
sparseDarkDownSlant
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 57568 28784 14392 7196 3598 1799 33667 49601 57568 28784 14392 7196 3598 1799 33667 49601)
offset: 0@0) asPattern!
sparseDarkUpSlant
"return this fill pattern"
^ (Image
extent: 16@16
fromArray: #( 57568 49601 33667 1799 3598 7196 14392 28784 57568 49601 33667 1799 3598 7196 14392 28784)
offset: 0@0) asPattern!
sparseDashedHorizontal
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 26214 0 0 0 39321 0 0 0 26214 0 0 0 39321 0 0 0)
offset: 0@0) asPattern!
sparseDashedVertical
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 257 4112 4112 257 257 4112 4112 257 257 4112 4112 257 257 4112 4112 257)
offset: 0@0) asPattern!
sparseDiagonalCrosshatch
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 20560 34952 1285 514 1285 34952 20560 8224 20560 34952 1285 514 1285 34952 20560 8224)
offset: 0@0) asPattern!
sparseGrayFilledDiagonalCrosshatch
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 16705 32896 0 32896 16705 41634 21845 41634 16705 32896 0 32896 16705 41634 21845 41634)
offset: 0@0) asPattern!
sparseHorizontal
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 65535 0 0 0 65535 0 0 0 65535 0 0 0 65535 0 0 0)
offset: 0@0) asPattern!
sparseLightDownSlant
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 2056 1028 514 257 32896 16448 8224 4112 2056 1028 514 257 32896 16448 8224 4112)
offset: 0@0) asPattern!
sparseLightUpSlant
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 257 514 1028 2056 4112 8224 16448 32896 257 514 1028 2056 4112 8224 16448 32896)
offset: 0@0) asPattern!
sparseVertical
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 4369 4369 4369 4369 4369 4369 4369 4369 4369 4369 4369 4369 4369 4369 4369 4369)
offset: 0@0) asPattern!
triangles
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 0 16448 41120 0 0 1028 2570 0 0 16448 41120 0 0 1028 2570 0)
offset: 0@0) asPattern!
upSlantShingles
"return this fill pattern"
^ (Image
extent: 16@16
fromArray: #( 32896 257 514 17733 43690 65535 8224 16448 32896 257 514 17733 43690 65535 8224 16448)
offset: 0@0) asPattern!
verticalShingles
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 1028 42148 21845 43690 1028 1028 1028 1028 1028 42148 21845 43690 1028 1028 1028 1028)
offset: 0@0) asPattern!
verticalZigzag
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 4369 8738 8738 4369 34952 17476 17476 34952 4369 8738 8738 4369 34952 17476 17476 34952)
offset: 0@0) asPattern!
veryDarkScatter
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 61423 31611 65535 57054 63479 32639 57311 65021 61423 31611 65535 57054 63479 32639 57311 65021)
offset: 0@0) asPattern!
veryLightScatter
"return this fill pattern"
^ (Image
extent: 16@16
fromArray: #( 0 2313 16448 1028 257 4112 32896 9252 0 2313 16448 1028 257 4112 32896 9252)
offset: 0@0) asPattern!
veryVeryLightGrayDiagonal
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 0 16448 0 0 0 1028 0 0 0 16448 0 0 0 1028 0 0)
offset: 0@0) asPattern!
veryVeryLightGrayHorizontal
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 0 0 0 4112 0 0 0 0 0 0 0 4112 0 0 0 0)
offset: 0@0) asPattern!
veryVeryLightScatter
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 32896 2056 0 0 8224 514 0 0 32896 2056 0 0 8224 514 0 0)
offset: 0@0) asPattern!
veryWideDiagonalWeave
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 8738 16705 57568 20560 34952 1285 3598 5140 8738 16705 57568 20560 34952 1285 3598 5140)
offset: 0@0) asPattern!
wideDiagonalWeave
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 34952 23644 15934 7453 34952 53713 58339 50629 34952 23644 15934 7453 34952 53713 58339 50629)
offset: 0@0) asPattern!
wideHorizontalWeave
"return this fill pattern"
^(Image
extent: 16@16
fromArray: #( 16191 8481 8481 16191 62451 4626 4626 62451 16191 8481 8481 16191 62451 4626 4626 62451)
offset: 0@0) asPattern! !